use "/Users/eporter/Dropbox/Iowa Teachers Union Experiment/Persuasion test/Replication/main_survey.dta", clear
	
gen observed = 1
replace observed = 0 if megaindex_nostrike!=.

logit observed treat_vidonly treat_pers i.parentbin i.educ3 i.inc_quartiles i.age_terciles i.white i.anymem i.knowanyunionmem i.knowanyteacher i.ideo3 i.party3

predict observed_hat

gen wt=1/observed_hat

regress std_megaindex_nostrike treat_vidonly treat_pers i.parentbin i.educ3 i.inc_quartiles i.age_terciles i.white i.anymem i.knowanyunionmem i.knowanyteacher i.ideo3 i.party3 [aw=wt]

outreg2 using "mode_attrition.tex", tex replace ctitle(Model 1) label
